package com.ruibang.glass.material.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * <p>
 * 料罐管理
 * </p>
 *
 * @author songJinKang
 * @since 2024-03-26
 */
@Data
@ApiModel(value = "料罐管理")
@TableName("g_material_bucket_manager")
public class BucketManager extends BaseEntity {
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    @ApiModelProperty(value = "容器编号")
    @NotBlank(message = "容器编号不可为空")
    private String containerCode;
    @ApiModelProperty(value = "容器名称")
    @NotBlank(message = "容器名称不可为空")
    private String containerName;
    @ApiModelProperty(value = "是否使用：1：是，0：否")
    @NotBlank(message = "使用状态不可为空")
    private String isUse;
    @ApiModelProperty(value = "仓库ID")
    private String warehouseId;
    @ApiModelProperty(value = "仓位ID")
    private String warehousePositionId;
    @ApiModelProperty(value = "更新人用户ID")
    private String updateUserId;
    @ApiModelProperty(value = "更新人用户名称")
    private String updateUserName;
    @ApiModelProperty(value = "是否删除：1：是 0：否")
    @TableLogic
    private String isDelete;
    @ApiModelProperty(value = "是否空罐  1：是，0：否")
    private String status;
    @ApiModelProperty(value = "上次装料时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime loadTime;
    @ApiModelProperty(value = "上次卸料时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime unLoadTime;
    @ApiModelProperty(value = "装货记录ID")
    private String recordId;
    @ApiModelProperty(value = "卸料状态：0异常 1正常")
    @TableField(exist = false)
    private String unloadStatus;
    @ApiModelProperty(value = "仓库名称")
    @TableField(exist = false)
    private String warehouseName;
    @ApiModelProperty(value = "库位名称")
    @TableField(exist = false)
    private String warehousePositionName;
}
